/*
	This code is a edited version of Xooxer's Platformer Test Source PixelStep
	Why rewrite something which is already made :P
*/

GameLoop
	var
		delay = 0.1
		list/loopList

	New()
		..()
		spawn() Loop()

	proc
		Loop()
			for(var/atom/A in loopList) A.Loop()
			spawn(delay*world.tick_lag) Loop()

var
	stop_all = 1

atom
	proc
		Loop()
			if(stop_all < 1) ..()


mob
	New()
		while(!Cycle) sleep(1)
		if(!Cycle.loopList) Cycle.loopList = new()
		Cycle.loopList += src
		..()